package com.lagou.controller;

import com.lagou.service.HelloService;
import com.lagou.service.NewHelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class DemoController {

    @Reference
    private HelloService helloService;
    @Reference
    private NewHelloService newService;

    @RequestMapping("/hello")
    public String sayHello(){
        String result = helloService.sayHello("world", 0);
        System.out.println(result);
        String res2 = newService.sayNewHello("yang",0);
        System.out.println(res2);
        return result;
    }
}
